<template>
  <div @click="(evt)=>$emit('click', evt)" class="login-button__module">
    <i class="el-icon-loading" v-if="loading" />
    <i :class="icon" v-else-if="icon" />
    <span style="container-slot">
      <slot>这是一个按钮</slot>
    </span>
  </div>
</template>

<script>
export default {
    name: 'LoginFormButton',
    props: {
        icon: String,
        loading: [Boolean, String],
        disabled: [Boolean, String],
    },
};
</script>

<style lang="less">
.login-button__module {
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: @formRadius;
  cursor: pointer;
  user-select: none;
  .container-slot {
    position: relative;
    z-index: 1;
  }
}
</style>
